@page "/"
@using Microsoft.AspNetCore.Components.Web
@namespace RadzenBlazorDemos.Server.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <base href="~/" />
    <link href="css/site.css" rel="stylesheet" />
    <component type="typeof(HeadOutlet)" render-mode="WebAssemblyPrerendered" />
    <link rel="stylesheet" href="css/bootstrap/bootstrap.min.css" />
    <style>
        :root {
            font-size: var(--rz-root-font-size);
        }

        body {
            font-family: var(--rz-text-font-family);
            color: var(--rz-text-color);
            font-size: var(--rz-body-font-size);
            line-height: var(--rz-body-line-height);
            background-color: var(--rz-body-background-color);
        }

        a {
            color: var(--rz-link-color);
        }

        a:hover,
        a:focus {
            color: var(--rz-link-hover-color);
        }
    </style>
    <component type="typeof(RadzenBlazorDemos.Shared.Theme)" render-mode="Static" />
    <link rel="stylesheet" data-name="vs/editor/editor.main" href="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.1/min/vs/editor/editor.main.min.css">
</head>
<body class="rz-scrollbars">
    <component type="typeof(RadzenBlazorDemos.App)" render-mode="WebAssemblyPrerendered" />
    <div id="blazor-error-ui">
        <environment include="Staging,Production">
            An error has occurred. This application may no longer respond until reloaded.
        </environment>
        <environment include="Development">
            An unhandled exception has occurred. See browser dev tools for details.
        </environment>
        <a href="" class="reload">Reload</a>
        <a class="dismiss">🗙</a>
    </div>

    <script src="_framework/blazor.webassembly.js"></script>
    <script async src="js/highlight.pack.js"></script>
    <script src="_content/Radzen.Blazor/Radzen.Blazor.js"></script>
    <script defer data-domain="blazor.radzen.com" src="https://analytics.radzen.com/js/plausible.js"></script>
    <script>var require = { paths: { 'vs': 'https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.1/min/vs' } }</script>
    <script async src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.1/min/vs/loader.min.js"></script>
    <script async src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.1/min/vs/editor/editor.main.nls.js"></script>
    <script async src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.34.1/min/vs/editor/editor.main.js"></script>
    <script>
        var instances = {};
        function createEditor(element, id, ref, options) {
            var instance = monaco.editor.create(element, options);
            instance.onDidChangeModelContent(function () {
                ref.invokeMethodAsync('OnChangeAsync', instance.getValue());
            });
            instances[id] = instance;
            return instance;
        }

        function copy(id) {
            var text = instances[id].getValue();
            navigator.clipboard.writeText(text);
        }
    </script>
</body>
</html>
